import radio from './rule/radio'
import checkbox from './rule/checkbox'
import input from './rule/input'
import textarea from './rule/textarea'
import password from './rule/password'
import number from './rule/number'
import select from './rule/select'
import _switch from './rule/switch'
import slider from './rule/slider'
import time from './rule/time'
import timeRange from './rule/timeRange'
import date from './rule/date'
import dateRange from './rule/dateRange'
import row from './rule/row'
import col from './rule/col'
import tabPane from './rule/tabPane'
import divider from './rule/divider'
import cascader from './rule/cascader'
import tree from './rule/tree'
import alert from './rule/alert'
import space from './rule/space'
import tabs from './rule/tabs'
import group from './rule/group'
import subForm from './rule/subForm'
import collapse from './rule/collapse'
import collapseItem from './rule/collapseItem'
import treeSelect from './rule/treeSelect'
import html from './rule/html'
import tableForm from './rule/tableForm'
import tableFormColumn from './rule/tableFormColumn'
import DkTinyEditor from './rule/DkTinyEditor.js'
import DkColorInput from '@/components/FcDesigner/config/rule/DkColorInput.js'
import DkUrlInput from '@/components/FcDesigner/config/rule/DkUrlInput.js'
import DkFileInput from '@/components/FcDesigner/config/rule/DkFileInput.js'
import DkAudioInput from '@/components/FcDesigner/config/rule/DkAudioInput.js'
import DkImageInput from '@/components/FcDesigner/config/rule/DkImageInput.js'
import DkVideoInput from '@/components/FcDesigner/config/rule/DkVideoInput.js'
import DkIconInput from '@/components/FcDesigner/config/rule/DkIconInput.js'
import DkVideoListInput from '@/components/FcDesigner/config/rule/DkVideoListInput.js'
import DkFileListInput from '@/components/FcDesigner/config/rule/DkFileListInput.js'
import DkImageListInput from '@/components/FcDesigner/config/rule/DkImageListInput.js'
import DkAudioListInput from '@/components/FcDesigner/config/rule/DkAudioListInput.js'
import DkAnimateSelect from '@/components/FcDesigner/config/rule/DkAnimateSelect.js'
import DkStyleInput from '@/components/FcDesigner/config/rule/DkStyleInput.js'

const ruleList = [
  input,
  textarea,
  password,
  number,
  radio,
  checkbox,
  select,
  _switch,
  time,
  timeRange,
  slider,
  date,
  dateRange,
  cascader,
  tree,
  treeSelect,
  group,
  subForm,
  tableForm,
  tableFormColumn,
  alert,
  html,
  divider,
  row,
  tabs,
  space,
  collapse,
  col,
  tabPane,
  collapseItem,
  DkTinyEditor,
  DkColorInput,
  DkUrlInput,
  DkFileInput,
  DkIconInput,
  DkAudioInput,
  DkImageInput,
  DkVideoInput,
  DkVideoListInput,
  DkFileListInput,
  DkImageListInput,
  DkAudioListInput,
  DkAnimateSelect,
  DkStyleInput
]

export default ruleList

export function defaultDrag(rule) {
  return {
    icon: rule.field ? 'icon-input' : 'icon-cell',
    label: rule.field || rule.type,
    name: '_',
    mask: true,
    handleBtn: ['delete'],
    rule() {
      return rule
    },
    props() {
      return []
    }
  }
}
